﻿Namespace Views.Shared
    Public Class LoginControl
        Inherits VbView

        Public Overloads Overrides Function Render() As XElement
            If Context.Request.IsAuthenticated Then
                Return <div>Welcome <b><%= Context.User.Identity.Name %></b>
                [ <%= Xhtml.ActionLink("Logout", "Logout", "Account") %> ]</div>
            Else
                Return <div>[ <%= Xhtml.ActionLink("Login", "Login", "Account") %> ]</div>
            End If
        End Function
    End Class
End Namespace